﻿var artApp = angular.module('artApp', [
    
    'ngRoute'
]);

artApp.config(function ($routeProvider, $httpProvider) {
    $routeProvider
    .when('/', {
        templateUrl: '/App/views/HomeView.html',
        controller: 'ArtController'
    })
    .when('/Home', {
        templateUrl: '/App/views/HomeView.html',
        controller: 'ArtController'
    })
    .when('/Artist/:id', {
        templateUrl: '/App/views/ArtistView.html',
        controller: 'ArtController'
    })
    .when('/login', {
        templateUrl: '/app/views/LoginView.html',
        controller: 'LoginController'
    })
    .otherwise({
        redirectTo: '/'
    });

    $httpProvider.interceptors.push('AuthService');
});